New Verilog samples / update to heuristics to distinguish from Coq#7493
Merged
lildude merged 4 commits intogithub-linguist:mainfrom Jan 8, 2026
Merged
New Verilog samples / update to heuristics to distinguish from Coq#7493lildude merged 4 commits intogithub-linguist:mainfrom
lildude merged 4 commits intogithub-linguist:mainfrom
Conversation
…d IP - Allow no space between module name and parameter/port list using \s* - Add `pragma` to preprocessor directive match - Allow no space between `always`/`initial` and @ This improves detection of real-world Verilog files such as: - Vivado-generated module stubs like `module name(...)` - Encrypted vendor IP with `pragma protect` - Compact constructs like `always@(posedge clk)` Previously, these were sometimes misclassified as Rocq Prover or Coq.
- Added `module_stub.v`: Vivado-style stub using `module name(...)` syntax with no space - Added `encrypted_module.v`: representative of encrypted IP using `pragma protect` - Modified `button_debounce.v` to include a valid `always@(...)` syntax case These examples demonstrate the heuristic's improved ability to detect real-world Verilog files, including those previously misclassified as Rocq Prover or Coq due to compact or directive-heavy syntax.
lildude
reviewed
Aug 26, 2025
lildude
reviewed
Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request fixes misclassification of certain
.vVerilog files that were previously identified as Rocq Prover or Coq due to syntax edge cases. These cases include:modulekeyword is followed directly by the port list with no space (e.g.,module foo(...))`pragma protectdirectives (common in encrypted IP cores)always@orinitial@without space before the sensitivity listThe updated
heuristics.ymlpattern broadens the existing Verilog match to allow for:#and(in module declarations`pragmaas a valid Verilog preprocessor directive@inalwaysandinitialblocksTwo new
.vsamples are added to demonstrate these cases, and an existing sample (button_debounce.v) is updated to include a real-world use ofalways@.Checklist:
module_stub.v: Vivado-generated module stubencrypted_module.v: encrypted IP filebutton_debounce.v: Changealways @ (toalways@(to provide an example of the possibility of no whitespace between these operators.Supporting Evidence
always @andalways@are widely used:always @: ~618,000 resultsalways@: ~60,900 resultsalways@:1bitSDR/NCO.v#L36